<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\Models\MyWechatUpload
 *
 * @property int $id
 * @property string $openid openid
 * @property int $type 1-图片,2-视频
 * @property int $wechat_upload_id 1-图片,2-视频
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property string|null $deleted_at
 * @property-read \App\Models\WechatUpload $wechat_upload
 * @method static bool|null forceDelete()
 * @method static \Illuminate\Database\Query\Builder|\App\Models\MyWechatUpload onlyTrashed()
 * @method static bool|null restore()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereOpenid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MyWechatUpload whereWechatUploadId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\MyWechatUpload withTrashed()
 * @method static \Illuminate\Database\Query\Builder|\App\Models\MyWechatUpload withoutTrashed()
 * @mixin \Eloquent
 */
class MyWechatUpload extends Model
{
    use SoftDeletes;

    public function wechat_upload()
    {
        return $this->belongsTo(WechatUpload::class);
    }

    protected $fillable = ['openid', 'wechat_upload_id'];
}
